package com.project.sianet.fragment;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.project.sianet.R;
import com.project.sianet.entidades.Alumno;

public class MisHijosDatosPersonalesFragment extends Fragment {
	
	private String mTitleFrag;
	private int mSubTitleFrag;
	
	public MisHijosDatosPersonalesFragment() {}
	
	public static final MisHijosDatosPersonalesFragment newInstance(Alumno alu) {
		MisHijosDatosPersonalesFragment f = new MisHijosDatosPersonalesFragment();
		Bundle args = new Bundle();
		args.putString("mTitleFrag", alu.getNombreCompleto());
		args.putInt("mSubTitleFrag", R.string.subtitle_bar_datosPers);
		f.setArguments(args);
		return f;
	}
	
	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
		return inflater.inflate(R.layout.fragment_mishijos_datospersonales, null);
	}
	
	@Override
	public void onActivityCreated(Bundle savedInstanceState) {
		super.onActivityCreated(savedInstanceState);

		mTitleFrag = getArguments().getString("mTitleFrag");
		mSubTitleFrag = getArguments().getInt("mSubTitleFrag");
		
		TextView title = (TextView)this.getActivity().findViewById(R.id.tv_title);
		TextView subtitle = (TextView)this.getActivity().findViewById(R.id.tv_subTitle);
		subtitle.setVisibility(View.VISIBLE);
		title.setText(mTitleFrag);
		subtitle.setText(mSubTitleFrag);
        
	}
	
}
